
(defun ValidEuler1Input(max factors)
  (and (containsOnlyPositiveIntegers factors) (ispositveinteger max)))

(defun euler1(max factors)
  "call using (euler1 999 (list 3 5)"
  (setf uniqueFactors (remove-duplicates factors))
  (if (ValidEuler1Input max uniquefactors)
    (-
      (TotalSumMultiplesBelow max uniqueFactors)
      (TotalSumMultiplesBelow max (commonMultiples uniqueFactors)))))

(defun testC()
  
  (print (euler1 9999 (list 3 0)))
  (print (euler1 9999 (list 3 5)))
  (print (euler1 9999 (list 3.0 5)))
  (print (euler1 9999 (list "a" "b")))
  (print (euler1 9999 (list 0 0)))
  (print (euler1 9999 (list -1 0)))
  (print (euler1 -9999 (list -1 0)))
  (print (euler1 -9999 (list -1 0)))
  (euler1 999 (list 3 5 10000)))

